.class public Lcom/esfile/screen/recorder/picture/pngj/e;
.super Ljava/lang/Object;
.source "ImageLineInt.java"

# interfaces
.implements Lcom/esfile/screen/recorder/picture/pngj/b;


# instance fields
.field public final a:Lcom/esfile/screen/recorder/picture/pngj/c;

.field protected final b:[I

.field protected final c:I

.field protected d:Lcom/esfile/screen/recorder/picture/pngj/FilterType;


# direct methods
.method public constructor <init>(Lcom/esfile/screen/recorder/picture/pngj/c;[I)V
    .locals 1

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    sget-object v0, Lcom/esfile/screen/recorder/picture/pngj/FilterType;->FILTER_UNKNOWN:Lcom/esfile/screen/recorder/picture/pngj/FilterType;

    iput-object v0, p0, Lcom/esfile/screen/recorder/picture/pngj/e;->d:Lcom/esfile/screen/recorder/picture/pngj/FilterType;

    .line 3
    iput-object p1, p0, Lcom/esfile/screen/recorder/picture/pngj/e;->a:Lcom/esfile/screen/recorder/picture/pngj/c;

    .line 4
    iput-object v0, p0, Lcom/esfile/screen/recorder/picture/pngj/e;->d:Lcom/esfile/screen/recorder/picture/pngj/FilterType;

    .line 5
    iget p1, p1, Lcom/esfile/screen/recorder/picture/pngj/c;->l:I

    iput p1, p0, Lcom/esfile/screen/recorder/picture/pngj/e;->c:I

    if-eqz p2, :cond_0

    .line 6
    array-length v0, p2

    if-lt v0, p1, :cond_0

    goto :goto_0

    :cond_0
    iget p1, p0, Lcom/esfile/screen/recorder/picture/pngj/e;->c:I

    new-array p2, p1, [I

    :goto_0
    iput-object p2, p0, Lcom/esfile/screen/recorder/picture/pngj/e;->b:[I

    return-void
.end method


# virtual methods
.method public a([B)V
    .locals 9

    .line 1
    iget-object v0, p0, Lcom/esfile/screen/recorder/picture/pngj/e;->d:Lcom/esfile/screen/recorder/picture/pngj/FilterType;

    iget v0, v0, Lcom/esfile/screen/recorder/picture/pngj/FilterType;->val:I

    int-to-byte v0, v0

    const/4 v1, 0x0

    aput-byte v0, p1, v1

    .line 2
    iget-object v0, p0, Lcom/esfile/screen/recorder/picture/pngj/e;->a:Lcom/esfile/screen/recorder/picture/pngj/c;

    iget v0, v0, Lcom/esfile/screen/recorder/picture/pngj/c;->c:I

    const/16 v2, 0x8

    if-ne v0, v2, :cond_0

    .line 3
    :goto_0
    iget v0, p0, Lcom/esfile/screen/recorder/picture/pngj/e;->c:I

    if-ge v1, v0, :cond_4

    add-int/lit8 v0, v1, 0x1

    .line 4
    iget-object v2, p0, Lcom/esfile/screen/recorder/picture/pngj/e;->b:[I

    aget v1, v2, v1

    int-to-byte v1, v1

    aput-byte v1, p1, v0

    move v1, v0

    goto :goto_0

    :cond_0
    const/16 v3, 0x10

    const/4 v4, 0x1

    if-ne v0, v3, :cond_1

    .line 5
    :goto_1
    iget v0, p0, Lcom/esfile/screen/recorder/picture/pngj/e;->c:I

    if-ge v1, v0, :cond_4

    add-int/lit8 v0, v4, 0x1

    .line 6
    iget-object v3, p0, Lcom/esfile/screen/recorder/picture/pngj/e;->b:[I

    aget v5, v3, v1

    shr-int/2addr v5, v2

    int-to-byte v5, v5

    aput-byte v5, p1, v4

    add-int/lit8 v4, v0, 0x1

    .line 7
    aget v3, v3, v1

    and-int/lit16 v3, v3, 0xff

    int-to-byte v3, v3

    aput-byte v3, p1, v0

    add-int/lit8 v1, v1, 0x1

    goto :goto_1

    :cond_1
    sub-int/2addr v2, v0

    move v6, v2

    const/4 v3, 0x0

    const/4 v5, 0x0

    .line 8
    :goto_2
    iget v7, p0, Lcom/esfile/screen/recorder/picture/pngj/e;->c:I

    if-ge v3, v7, :cond_4

    .line 9
    iget-object v8, p0, Lcom/esfile/screen/recorder/picture/pngj/e;->b:[I

    aget v8, v8, v3

    shl-int/2addr v8, v6

    or-int/2addr v5, v8

    sub-int/2addr v6, v0

    if-ltz v6, :cond_2

    add-int/lit8 v7, v7, -0x1

    if-ne v3, v7, :cond_3

    :cond_2
    add-int/lit8 v6, v4, 0x1

    int-to-byte v5, v5

    .line 10
    aput-byte v5, p1, v4

    move v4, v6

    const/4 v5, 0x0

    move v6, v2

    :cond_3
    add-int/lit8 v3, v3, 0x1

    goto :goto_2

    :cond_4
    return-void
.end method

.method public toString()Ljava/lang/String;
    .locals 2

    .line 1
    new-instance v0, Ljava/lang/StringBuilder;

    invoke-direct {v0}, Ljava/lang/StringBuilder;-><init>()V

    const-string v1, " cols="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v1, p0, Lcom/esfile/screen/recorder/picture/pngj/e;->a:Lcom/esfile/screen/recorder/picture/pngj/c;

    iget v1, v1, Lcom/esfile/screen/recorder/picture/pngj/c;->a:I

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v1, " bpc="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v1, p0, Lcom/esfile/screen/recorder/picture/pngj/e;->a:Lcom/esfile/screen/recorder/picture/pngj/c;

    iget v1, v1, Lcom/esfile/screen/recorder/picture/pngj/c;->c:I

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    const-string v1, " size="

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    iget-object v1, p0, Lcom/esfile/screen/recorder/picture/pngj/e;->b:[I

    array-length v1, v1

    invoke-virtual {v0, v1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    invoke-virtual {v0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    return-object v0
.end method
